package com.wanwen.utils;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateUtils {
	private static DateFormat dateFormat = new SimpleDateFormat("HH:mm");//格式化日期
	
	public static String isstate() throws ParseException {
		//获取当前时间
		String d = dateFormat.format(new Date());
        Calendar date = Calendar.getInstance();
        date.setTime(dateFormat.parse(d));
        //获取结束时间
        Calendar begin = Calendar.getInstance();
        begin.setTime(dateFormat.parse("10:00"));//设置打卡时间
        if (date.before(begin)){
        	return "签到";//
        }else {
        	return "迟到";//
        }
		
	}
}
